﻿<phone:PhoneApplicationPage 
    x:Class="loud_tweets.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    shell:SystemTray.IsVisible="False"
    Loaded="PhoneApplicationPage_Loaded">

    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <Image x:Name="imgBackground" Source="Images/bg.jpg" Height="800" Width="500" VerticalAlignment="Top" HorizontalAlignment="Left" />
        <TextBlock x:Name="PageTitle" Text="loud tweets" Foreground="#FF4C4C4C" Margin="21,10,0,28" Style="{StaticResource PhoneTextTitle1Style}"/>
        <TextBox x:Name="txtTwitte" Text="" FontSize="25" Foreground="#FF4C4C4C" BorderBrush="#FF4C4C4C" BorderThickness="0.5" Height="70" Width="480" Margin="0,95" VerticalAlignment="Top" HorizontalAlignment="Left" LostFocus="txtTwitte_LostFocus" KeyDown="txtTwitte_KeyDown"  />
        <Image x:Name="imgTwitter" Source="Images/bird.png" Height="55" Width="50" VerticalAlignment="Top" HorizontalAlignment="Right" Margin="0,104,22,0" MouseLeftButtonDown="imgTwitter_MouseLeftButtonDown" />
        <Image Source="Images/settings2.png" Visibility="Collapsed" Height="32" Width="32" VerticalAlignment="Top" HorizontalAlignment="Right" Margin="0,173,28,0" />
        <Image x:Name="imgSound" Source="Images/sound_on.png" Height="32" Width="35" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,76,30,0" MouseLeftButtonDown="imgSound_MouseLeftButtonDown" />

        <ListBox x:Name="lboTwitte" FontSize="25" Height="602" SelectionChanged="lboTwitte_SelectionChanged" Foreground="#FF4C4C4C" Width="331" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="16,170,0,0" >
            <ListBox.ItemTemplate>
                <DataTemplate>
                    <StackPanel Orientation="Vertical">
                        <TextBlock Text="{ Binding Date}" TextWrapping="Wrap" Margin="0,0,0,0" />
                        <TextBlock Text="{ Binding Title}" TextWrapping="Wrap" Margin="0,0,0,30" />
                    </StackPanel>
                </DataTemplate>
            </ListBox.ItemTemplate>
        </ListBox>

        <TextBlock x:Name="lblLoading" Visibility="Collapsed" Text="loading..." FontSize="25" Foreground="#FF4C4C4C" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,-50,0,0" />
        <MediaElement x:Name="media" Width="0" Height="0" />
    </Grid>
 
</phone:PhoneApplicationPage>